//package com.example.appxi;
//
//import com.navdrawer.SimpleSideDrawer;
//
//import android.app.AlertDialog;
//import android.support.v7.app.ActionBarActivity;
//import android.support.v7.app.ActionBar;
//import android.support.v4.app.Fragment;
//import android.annotation.SuppressLint;
//import android.app.AlertDialog;
//import android.content.Context;
//import android.content.DialogInterface;
//import android.content.Intent;
//import android.os.Bundle;
//import android.view.LayoutInflater;
//import android.view.Menu;
//import android.view.MenuItem;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.Button;
//import android.os.Build;
//import android.view.View.OnClickListener;
//
//public class CopyOfMainActivity extends LeftSlideMenu {
//	private SimpleSideDrawer mNav;
//	private BackPressCloseHandler backPressCloseHandler;
//
//    @SuppressLint("NewApi")
//	@Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState); 
//        setContentView(R.layout.fragment_main);
//        backPressCloseHandler = new BackPressCloseHandler(this);
////        if (savedInstanceState == null) {
////            getSupportFragmentManager().beginTransaction()
////                    .add(R.id.container, new PlaceholderFragment())
////                   .commit();
////        }
//        // 액션바를 가져왔다
//     	android.app.ActionBar bar = getActionBar();
//     	// 뷰를 가져옴
//     	View v = getLayoutInflater().inflate(R.layout.custombar, null);
//     		
//     	// 액션바에 커스텀뷰를 설정
//     	bar.setCustomView(v);
//     		
//     	// 커스텀 뷰를 써야하므로 옵션에서 설정
//     	bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
//     	
//     	mNav = new SimpleSideDrawer(this);
//        mNav.setLeftBehindContentView(R.layout.activity_behind_left_simple);
//        Button btnLeftSlide = (Button) findViewById(R.id.bt_leftslide);
//        
//        btnLeftSlide.setOnClickListener(new OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                mNav.toggleLeftDrawer();
//            }
//        });
//        Button btn_search = (Button) findViewById(R.id.btn_search);
//        final Button btn_me = (Button) findViewById(R.id.bt_me);
//        btn_search.setOnClickListener(new OnClickListener() {
//        	@Override
//        	public void onClick(View v) {
//        		Intent intent = new Intent(CopyOfMainActivity.this, SearchActivity.class);
//            	startActivity(intent);
//        		finish();
//        	}
//        }
//        );
//        btn_me.setOnClickListener(new OnClickListener() {
//        	public void onClick(View view){
//                if(view==btn_me){ //view가 alert 이면 팝업실행 즉 버튼을 누르면 팝업창이 뜨는 조건
//                    Context mContext = getApplicationContext();
//                    LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
//         
//                    //R.layout.dialog는 xml 파일명이고  R.id.popup은 보여줄 레이아웃 아이디
//                    View layout = inflater.inflate(R.layout.popupwindow,(ViewGroup) findViewById(R.id.popup));
//                    AlertDialog.Builder aDialog = new AlertDialog.Builder(CopyOfMainActivity.this);
//                 
//                    aDialog.setTitle("내 정보"); //타이틀바 제목
//                    aDialog.setView(layout); //dialog.xml 파일을 뷰로 셋팅
//                 
//                    //그냥 닫기버튼을 위한 부분
//                    aDialog.setNegativeButton("닫기", new DialogInterface.OnClickListener() {
//                    public void onClick(DialogInterface dialog, int which) {
//                    }
//                });
//                //팝업창 생성
//                AlertDialog ad = aDialog.create();
//                ad.show();//보여줌!
//            }
//        	}
//        });
//    }
//
//
//    public void onBackPressed() {
//        //super.onBackPressed();
//        backPressCloseHandler.onBackPressed();
//    }
//    
//    @Override
//    public boolean onCreateOptionsMenu(Menu menu) {
//        
//        // Inflate the menu; this adds items to the action bar if it is present.
//        //getMenuInflater().inflate(R.menu.main, menu);
//        return true;
//    }
//
//    @Override
//    public boolean onOptionsItemSelected(MenuItem item) {
//        // Handle action bar item clicks here. The action bar will
//        // automatically handle clicks on the Home/Up button, so long
//        // as you specify a parent activity in AndroidManifest.xml.
//        int id = item.getItemId();
//        if (id == R.id.action_settings) {
//            return true;
//        }
//        return super.onOptionsItemSelected(item);
//    }
//    
//
//
//    	
//
//
//    /**
//     * A placeholder fragment containing a simple view.
//     */
////    public static class PlaceholderFragment extends Fragment {
////
////        public PlaceholderFragment() {
////        }
////
////        @Override
////        public View onCreateView(LayoutInflater inflater, ViewGroup container,
////                Bundle savedInstanceState) {
////            View rootView = inflater.inflate(R.layout.fragment_main, container, false);
////            
////            MainActivity.btn_search = (Button)rootView.findViewById(R.id.btn_search);
////
////            MA.finishSet();
////            return rootView;
////        }
////    }
//
//}
